﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Soodustus.aspx.cs" Inherits="Kohvik_Soodustus" %>
<%@ Reference Control="~/UserControls/SoodustuseRida.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:PlaceHolder ID="ph_EditMenu" runat="server">
        <fieldset style="width: auto; font-size: 0.9em;">
            <legend>Muuda soodustusi</legend>
            <asp:Panel ID="panelPealkirjad" runat="server">
                <asp:Label ID="lblNimetus" runat="server" Text="Nimetus" Width="17%" />
                <asp:Label ID="lblProtsent" runat="server" Text="Soodustuse protsent" Width="8%" />
                <asp:Label ID="lblKomm" runat="server" Text="Kommentaar" Width="30%" />
                <asp:Label ID="lblDelete" runat="server" Text="Kustuta" Width="5%" />
                <asp:HiddenField ID="soodustusID" runat="server" />
            </asp:Panel>
            <asp:Panel ID="panelEdit" runat="server">

            </asp:Panel>
            <br />
            <br />
            <asp:Button ID="btnMuuda" runat="server" Text="Muuda" OnClick="btnMuuda_Click" CssClass="btn" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="btnKustuta" runat="server" Text="Kustuta valitud soodustused" OnClick="btnKustuta_Click" CssClass="btn" />
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="lblCheck" runat="server" Text="" ForeColor="Green" />
            <asp:HiddenField ID="hf_asjadeArv" runat="server" />
        </fieldset>
    </asp:PlaceHolder>
    <asp:PlaceHolder ID="ph_addMenuItem" runat="server">
        <fieldset style="width: auto; font-size: 0.9em;">
            <legend>Lisa uus soodustus</legend>
            <asp:TextBox ID="uusSoodustusNimi" runat="server" Text="Uus soodustus"></asp:TextBox>
            <asp:TextBox ID="uusSoodustusProtsent" runat="server" Text="0,00" style="text-align:right;" />
            <asp:TextBox ID="uusSoodustusKomm" runat="server" Text="Kommentaar"></asp:TextBox>
            &nbsp;&nbsp;
            <asp:Button ID="btnLisa" runat="server" Text="Lisa" OnClick="btnLisa_Click" CssClass="btn" />&nbsp;&nbsp;
            <asp:Label ID="lbl_uusMenuItemHindError" runat="server" Text="" ForeColor="Red" />
            <br />
            <asp:RequiredFieldValidator ID="rfv_uusMenuItem" runat="server" ErrorMessage="Sisesta soodustuse nimi"
                ControlToValidate="uusSoodustusNimi" ForeColor="Red" ></asp:RequiredFieldValidator>
        </fieldset>
        <div>
            <fieldset style="width: auto; font-size: 0.9em;">
               <legend>Lisa olemasolev soodustus</legend>
                   <asp:DropDownList ID="ddl_Soodustus" runat="server" />&nbsp;&nbsp;&nbsp;&nbsp;
                   <asp:Button ID="btnLisaExist" runat="server" Text=" Lisa " OnClick="btnLisaExist_Click" CssClass="btn" />
            </fieldset>
        </div>
    </asp:PlaceHolder>
</asp:Content>
